package clue

type MyResponsibleCustomersRequest struct {
	Page            int32    `json:"page" binding:"required,min=1,max=500" err:"页码参数错误"`
	PageSize        int32    `json:"page_size" binding:"required,min=1,max=500" err:"页面大小参数错误"`
	Keyword         string   `json:"keyword" binding:"max=120" err:"输入长度不能超过 40"`
	Group           []string `json:"group" binding:"max=120" err:"输入长度不能超过 40"`
	AreaCodes       []string `json:"area_codes" binding:"max=500" err:"备选项超出范围"`
	CompanyLabel    []string `json:"company_label" binding:"max=50" err:"备选项超出范围"`
	CompanyIdentity []string `json:"company_identity" binding:"max=50" err:"备选项超出范围"`
	CompanyLevel    []string `json:"company_level" binding:"max=50" err:"备选项超出范围"`
	CompanyType     []string `json:"company_type" binding:"max=50" err:"备选项超出范围"`
}

type CustomerListItem struct {
	Id                       int64                `json:"id"`
	CompanyName              string               `json:"company_name"`
	OrganizingCode           string               `json:"organizing_code"`
	CompanyLogo              string               `json:"company_logo"`
	Group                    string               `json:"group"`
	BusinessStatus           string               `json:"business_status"`
	TopCompanyName           string               `json:"top_company_name"`
	TopCompanyOrganizingCode string               `json:"top_company_organizing_code"`
	CompanyIdentity          []string             `json:"company_identity"`
	CompanyType              string               `json:"company_type"`
	CompanyLevel             []*CustomerLabelItem `json:"company_level"`
	CompanyLabel             []*CustomerLabelItem `json:"company_label"`
	Province                 string               `json:"province"`
	City                     string               `json:"city"`
	ProvinceCode             string               `json:"province_code"`
	CityCode                 string               `json:"city_code"`
	ClueCnt                  int32                `json:"clue_cnt"`
	ReportCnt                int32                `json:"report_cnt"`
	BidCnt2Year              int32                `json:"bid_cnt_2year"`
	TakeLandCnt2Year         int32                `json:"take_land_cnt_2year"`
	CommencePermitCnt2Year   int32                `json:"commence_permit_cnt_2year"`
	SellProjectCnt2Year      int32                `json:"sell_project_cnt_2year"`
	CooperationCaseCnt2Year  int32                `json:"cooperation_case_cnt_2year"`
	CreditLevel              string               `json:"credit_level"`
	ResponsibleUserName      string               `json:"responsible_user_name"`
	ResponsibleUserId        int64                `json:"responsible_user_id"`
	CreatedBy                int64                `json:"created_by"`
	CreatedByUserName        string               `json:"created_by_user_name"`
	CreatedOn                string               `json:"created_on"`
}

type CustomerLabelItem struct {
	Label  string `json:"label"`
	Remark string `json:"remark"`
}

type MyResponsibleCustomersResponse struct {
	List  []*CustomerListItem `json:"list"`
	Total int64               `json:"total"`
}

type CustomerRequest struct {
	Page               int32    `json:"page" binding:"required,min=1,max=500" err:"页码参数错误"`
	PageSize           int32    `json:"page_size" binding:"required,min=1,max=500" err:"页面大小参数错误"`
	Keyword            string   `json:"keyword" binding:"max=120" err:"输入长度不能超过 40"`
	Group              []string `json:"group" binding:"max=120" err:"输入长度不能超过 40"`
	AreaCodes          []string `json:"area_codes" binding:"max=500" err:"备选项超出范围"`
	CompanyLabel       []string `json:"company_label" binding:"max=50" err:"备选项超出范围"`
	CompanyIdentity    []string `json:"company_identity" binding:"max=50" err:"备选项超出范围"`
	CompanyLevel       []string `json:"company_level" binding:"max=50" err:"备选项超出范围"`
	ResponsibleUserIds []int64  `json:"responsible_user_ids" binding:"max=50" err:"备选项超出范围"`
	CompanyType        []string `json:"company_type" binding:"max=50" err:"备选项超出范围"`
}

type ExportCustomerRequest struct {
	Keyword            string   `json:"keyword" binding:"max=120" err:"输入长度不能超过 40"`
	Group              []string `json:"group" binding:"max=120" err:"输入长度不能超过 40"`
	AreaCodes          []string `json:"area_codes" binding:"max=500" err:"备选项超出范围"`
	CompanyLabel       []string `json:"company_label" binding:"max=50" err:"备选项超出范围"`
	CompanyIdentity    []string `json:"company_identity" binding:"max=50" err:"备选项超出范围"`
	CompanyLevel       []string `json:"company_level" binding:"max=50" err:"备选项超出范围"`
	ResponsibleUserIds []int64  `json:"responsible_user_ids" binding:"max=50" err:"备选项超出范围"`
	Category           string   `json:"category"`
}

type CustomerResponse struct {
	List  []*CustomerListItem `json:"list"`
	Total int64               `json:"total"`
}

type GroupOptionRequest struct {
}

type GroupOptionResponse struct {
	List []string `json:"list"`
}

type SaveCustomerRequest struct {
	Id                int64  `json:"id"`
	CompanyName       string `json:"company_name" binding:"required" err:"客户名称不能为空"`
	OrganizingCode    string `json:"organizing_code" binding:"required" err:"信用代码不能为空"`
	ResponsibleUserId int64  `json:"responsible_user_id" binding:"required" err:"负责人不能为空"`
	Group             string `json:"group"`
}

type SaveCustomerResponse struct {
	Id int64 `json:"id"`
}

type DeleteCustomerRequest struct {
	Id int64 `json:"id" binding:"required" err:"客户 Id 不能为空"`
}

type DeleteCustomerResponse struct {
}

type ImportFileRequest struct {
	FileId int64 `json:"file_id" binding:"required" err:"文件id不能为空"`
}

type ImportFileResponse struct {
	JobId int64 `json:"job_id"`
	Total int32 `json:"total"`
}

type ImportStatusRequest struct {
}

type ImportStatusResponse struct {
	Status       int32  `json:"status"`
	ImportTime   string `json:"import_time"`
	SucceedCount int64  `json:"succeed_count"`
	FailedCount  int64  `json:"failed_count"`
	FileId       int64  `json:"file_id"`
}

type ImportListRequest struct {
	Page        int32  `json:"page" form:"page" binding:"required,min=1,max=500" err:"页码参数错误"`
	PageSize    int32  `json:"page_size" form:"page_size" binding:"required,min=1,max=500" err:"页面大小参数错误"`
	CompanyName string `json:"company_name,omitempty" form:"company_name"`
	EndTime     string `json:"end_time,omitempty" form:"end_time"`
	StartTime   string `json:"start_time,omitempty" form:"start_time"`
	Status      int32  `json:"status,omitempty" form:"status"`
}

type ImportFileItem struct {
	Id                  int64  `json:"id"`
	FileId              int64  `json:"file_id"`
	Status              int32  `json:"status"`
	CompanyName         string `json:"company_name"`
	ResponsibleUserName string `json:"responsible_user_name"`
	ResponsiveUserId    int64  `json:"responsible_user_id"`
	CustomerGroup       string `json:"customer_group"`
	Remark              string `json:"remark"`
	CreatedBy           int64  `json:"created_by"`
	CreatedTime         string `json:"created_time"`
}

type ImportListResponse struct {
	Total int64             `json:"total"`
	List  []*ImportFileItem `json:"list"`
}

type ImportEditRequest struct {
	Id                int64  `json:"id" binding:"required" err:"id不能为空"`
	CompanyName       string `json:"company_name" binding:"required" err:"公司名称不能为空"`
	ResponsibleUserId int64  `json:"responsible_user_id" binding:"required" err:"负责人不能为空"`
}

type ImportEditResponse struct {
}

type ImportDeleteRequest struct {
	Id int64 `json:"id" binding:"required" err:"id不能为空"`
}

type ImportDeleteResponse struct {
}

type ImportCountRequest struct {
}

type ImportCountResponse struct {
	TotalCount   int64 `json:"total_count"`
	SucceedCount int64 `json:"succeed_count"`
	FailedCount  int64 `json:"failed_count"`
}

type ExportCustomerResponse struct {
	JobId int64 `json:"job_id"`
}
